export default {
  name: [{ required: true, message: "商品名称不能为空", trigger: "blur" }],
  category_id: [
    { required: true, message: "商品分类不能为空", trigger: "blur" }
  ],
  byname: [{ required: true, message: "商品别名不能为空", trigger: "blur" }],

  pinyin: [{ required: true, message: "关键词不能为空", trigger: "blur" }],
  goods_code: [
    { required: true, message: "编码(SPU)不能为空", trigger: "blur" }
  ],
  brand: [{ required: true, message: "商品品牌不能为空", trigger: "blur" }],
  buyer_id: [{ required: true, message: "采购员不能为空", trigger: "blur" }],
  supply_id: [{ required: true, message: "供应商不能为空", trigger: "blur" }],
  spu_name: [{ required: true, message: "属性不能为空", trigger: "blur" }],
  unit: [{ required: true, message: "单位不能为空", trigger: "blur" }],
  package_num: [
    { required: true, message: "包装数量不能为空", trigger: "blur" },
    {
      pattern: /^(\d+\.?)?\d{0,2}$/,
      message: "请输入整数和小数",
      trigger: "blur"
    }
  ],
  goods_spu_code: [
    { required: true, message: "条码不能为空", trigger: "blur" }
  ],
  purchase_price: [
    { required: true, message: "采购价不能为空", trigger: "blur" },
    {
      pattern: /^(\d+\.?)?\d{0,2}$/,
      message: "请输入整数和小数",
      trigger: "blur"
    }
  ],
  market_price: [
    { required: true, message: "市场价不能为空", trigger: "blur" },
    {
      pattern: /^(\d+\.?)?\d{0,2}$/,
      message: "请输入整数和小数",
      trigger: "blur"
    }
  ],
  minimum: [
    { required: true, message: "起订量不能为空", trigger: "blur" },
    {
      pattern: /^(\d+\.?)?\d{0,2}$/,
      message: "请输入整数和小数",
      trigger: "blur"
    }
  ],
  attrition_rate: [
    { required: true, message: "损耗率不能为空", trigger: "blur" },
    {
      pattern: /^(\d+\.?)?\d{0,2}$/,
      message: "请输入整数和小数",
      trigger: "blur"
    }
  ]
  // transfer_num: [
  //   { required: true, message: '转换数量不能为空', trigger: 'blur' },
  //   { pattern:/^(\d+\.?)?\d{0,2}$/, message: "请输入整数和小数", trigger: "blur" }
  // ],
  // transfer_unit: [
  //   { required: true, message: '转换规格不能为空', trigger: 'blur' },
  // ],
};
